package com.pmcc.cj.repository;

import com.pmcc.cj.entity.CjCarousel;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by tomas on 2020/9/21.
 */
public interface CjCarouselRepository extends JpaRepository<CjCarousel,String> {
    List<CjCarousel> findByCarouselTypeOrderBySequenceAsc(Integer carouselType);
    CjCarousel findFirstByCarouselTypeOrderBySequenceDesc(Integer carouselType);
    Page<CjCarousel> findAll(Specification<CjCarousel> spec, Pageable var1);
}
